import 'package:flutter/material.dart';

// Image扩展
extension ImageEx on Image {
  // 给Image扩展一个修改颜色的函数
  ColorFiltered colorFiltered({
    Color? color,
    BlendMode? blendMode,
  }) {
    return ColorFiltered(
      colorFilter: ColorFilter.mode(
        color ?? Colors.white,
        blendMode ?? BlendMode.srcIn,
      ),
      child: this,
    );
  }
}
